﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Nuane.Posterous;

namespace Writerous
{
    public partial class frmSuccess : Form
    {
        private PosterousPostInfo m_publishedPost;

        public frmSuccess(PosterousPostInfo publishedPost)
        {
            InitializeComponent();
            m_publishedPost = publishedPost;
            LoadUI();
        }

        private void LoadUI()
        {
            lnkCopyLink.Text = string.Format("Copy '{0}' to the clipboard.", m_publishedPost.ShortUri.ToString());
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void lnkOpenBrowser_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start(m_publishedPost.ShortUri.ToString());
        }

        private void lnkCopyLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Clipboard.SetText(m_publishedPost.ShortUri.ToString());
        }

        private void pbDonate_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LWVGD3J76Y6R4");
        }
    }
}
